package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DdOrderImgMapper;
import com.ruoyi.system.domain.DdOrderImg;
import com.ruoyi.system.service.IDdOrderImgService;
import com.ruoyi.common.core.text.Convert;

/**
 * 订单图片Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-03-24
 */
@Service
public class DdOrderImgServiceImpl implements IDdOrderImgService 
{
    @Autowired
    private DdOrderImgMapper ddOrderImgMapper;

    /**
     * 查询订单图片
     * 
     * @param uuid 订单图片ID
     * @return 订单图片
     */
    @Override
    public DdOrderImg selectDdOrderImgById(String uuid)
    {
        return ddOrderImgMapper.selectDdOrderImgById(uuid);
    }

    /**
     * 查询订单图片列表
     * 
     * @param ddOrderImg 订单图片
     * @return 订单图片
     */
    @Override
    public List<DdOrderImg> selectDdOrderImgList(DdOrderImg ddOrderImg)
    {
        return ddOrderImgMapper.selectDdOrderImgList(ddOrderImg);
    }

    /**
     * 新增订单图片
     * 
     * @param ddOrderImg 订单图片
     * @return 结果
     */
    @Override
    public int insertDdOrderImg(DdOrderImg ddOrderImg)
    {
        ddOrderImg.setCreateTime(DateUtils.getNowDate());
        return ddOrderImgMapper.insertDdOrderImg(ddOrderImg);
    }

    /**
     * 修改订单图片
     * 
     * @param ddOrderImg 订单图片
     * @return 结果
     */
    @Override
    public int updateDdOrderImg(DdOrderImg ddOrderImg)
    {
        return ddOrderImgMapper.updateDdOrderImg(ddOrderImg);
    }

    /**
     * 删除订单图片对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteDdOrderImgByIds(String ids)
    {
        return ddOrderImgMapper.deleteDdOrderImgByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除订单图片信息
     * 
     * @param uuid 订单图片ID
     * @return 结果
     */
    @Override
    public int deleteDdOrderImgById(String uuid)
    {
        return ddOrderImgMapper.deleteDdOrderImgById(uuid);
    }
}
